package demo3LinkList.MyNodeAndMyList;

/**
 * @ClassName $ {NAME}
 * @Description TODO  单链表的节点
 * @Author shenxinyuan
 * @Date $ {DATE} $ {TIME}
 * @Version 1. 0
 **/

public class Node<T> {
    private T value;
    private Node<T> next;

    public Node(T value){
        this.value = value;

    }

    @Override
    public String toString() {
        return "Node{" +
                "value=" + value +
                ", next=" + next +
                '}';
    }

    public void setValue(T value) {
        this.value = value;
    }

    public void setNext(Node<T> next) {
        this.next = next;
    }

    public T getValue() {
        return value;
    }

    public Node<T> getNext() {
        return next;
    }
}
